package org.tuproj.drujbapizza;

import android.os.Parcel;
import android.os.Parcelable;

public class Pizza implements Parcelable {

	private int id;
	private String name;
	private String description;
	private double price;
	
	public Pizza() {
	
	}
	private Pizza(Parcel in) {
		id = in.readInt();
		name = in.readString();
		description = in.readString();
		price = in.readDouble();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	@Override
	public String toString() {
		return id + ", " + name + ", " + description + ", " + price;
	}

	@Override
	public int describeContents() {
		
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(id);
		dest.writeString(name);
		dest.writeString(description);
		dest.writeDouble(price);

	}

	public static final Parcelable.Creator<Pizza> CREATOR = new Parcelable.Creator<Pizza>() {
		public Pizza createFromParcel(Parcel in) {
			return new Pizza(in);
		}

		public Pizza[] newArray(int size) {
			return new Pizza[size];
		}
	};





}
